package com.hinnotek.amoeba.bean

import javax.inject.Inject

class Truck @Inject constructor(val driver: Driver) {

    @EngineModule.BindGasEngine
    @Inject
    lateinit var engine: Engine

    @EngineModule.BindElectricEngine
    @Inject
    lateinit var engine2: Engine

    fun deliver(){

        engine.start()
        engine2.start()

        println("Truck is start. Driven by ${driver.name}")

        engine.shutdown()
        engine2.shutdown()
    }

}